Skip to content

Conversation

@bobozaur
Copy link
Contributor

@bobozaur bobozaur commented Oct 19, 2025

Adds the ability to set the strategy used in the solve. If the strategy is set by multiple features, the left-most one wins.

[project]
name = "foo"
platforms = []
channels = []
solve-strategy = "lowest-direct"

[feature.lowest]
solve-strategy = "lowest"

[feature.highest]
solve-strategy = "highest"

[feature.no_strategy]

[environments]
lowest = ["lowest"] # <- uses `lowest` strategy
highest = ["highest"] # <- uses `highest` strategy
combined_declared = ["lowest", "highest"] # <- uses `lowest` strategy
combined_undeclared = ["no_strategy", "lowest"] # <- uses `lowest` strategy
undeclared-default = ["no_strategy"] # <- uses `lowest-direct` strategy declared project wide
undeclared-no-default = { features = ["no_strategy"], no-default-feature = true } # <- no strategy declared, defaults to "highest"

Closes #4753 .

@bobozaur bobozaur force-pushed the feat/configurable-solve-strategy branch 4 times, most recently from 2b61540 to ec9ae71 Compare October 20, 2025 08:57
@bobozaur bobozaur force-pushed the feat/configurable-solve-strategy branch 2 times, most recently from d703f4f to 0d46894 Compare October 20, 2025 10:55
@bobozaur bobozaur marked this pull request as ready for review October 20, 2025 11:14
@bobozaur bobozaur force-pushed the feat/configurable-solve-strategy branch 6 times, most recently from 460c77b to af043d8 Compare October 22, 2025 11:21
Copy link
Contributor

@tdejager tdejager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny nit :)

@bobozaur bobozaur force-pushed the feat/configurable-solve-strategy branch from fc88b34 to 87dbcab Compare October 22, 2025 12:57
@bobozaur bobozaur requested a review from tdejager October 22, 2025 13:04
@tdejager
Copy link
Contributor

I'm gonna give this a small user-test tomorrow and then it's good to go I think!

@tdejager
Copy link
Contributor

Ok tested all of this out, and it works like expected and as a charm. Thank you for the contribution.

@tdejager tdejager enabled auto-merge (squash) October 24, 2025 11:40
@tdejager tdejager merged commit e8fdd2c into prefix-dev:main Oct 26, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add solve strategy option

2 participants